﻿
CREATE TABLE [dbo].[SearchIndex](
	[ID] [uniqueidentifier] NOT NULL,
	[IndexName] [nvarchar](50) NULL,
 CONSTRAINT [PK_SearchIndex] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'b6b75523-0c09-4a6f-ac60-00e23faa22db', N'SilverMerchant')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'02274677-66f2-4d77-905d-04b17b791224', N'All')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'85ab31de-3bef-4841-b8b7-0dcbc224890a', N'Books')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'3eb2aae1-539d-495a-829d-0e570c58a12f', N'Video')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'1db3db05-5286-489c-bf8f-0fbc5a2b3972', N'Grocery')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'0736da1e-925f-43a9-93ab-15373bbf30cf', N'HomeImprovement')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'9149ae82-95cb-463d-8391-170b5742d761', N'SportingGoods')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'4698705d-88f6-4aed-9cb5-199654c02dad', N'Cell Phones')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'3f8bce1a-84af-4de9-b219-216eb2f11583', N'Apparel')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'616e47b6-af3c-4620-8a24-308f7c0fbb7c', N'OfficeProducts')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'792c65b6-1af4-4d0d-8653-3701171f6cf8', N'Industrial')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'4b731bce-59ff-4309-9356-3b499dd6f6e1', N'Jewelry')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'65d29b64-ae34-4e34-9c4a-467c2f935b7f', N'Baby')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'876b02ef-b68b-4cee-bd58-4e9e81178afd', N'MusicTracks')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'b5c61cfd-9fa7-48e3-a965-51e257638bbc', N'Electronics')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'0d80091e-4b4b-41cc-852d-532664253113', N'MP3Downloads')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'a06d8933-1053-4e5a-9df9-5ce2ba441d11', N'KindleStore')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'f76f45cc-b115-42dc-a2e2-5ec22022155c', N'OutdoorLiving')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'6a99717b-6291-43db-8a47-607e4f5818fb', N'PCHardware')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'db896e8b-59fd-4827-b7b3-613273c9fcac', N'Automotive')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'f430c542-344c-46d7-848c-6ad93d2bfc6c', N'Toys')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'2ef266b2-6b14-4204-baa4-6d22b3e1c1f2', N'PetSupplies')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'9e6392ab-6092-4999-ac31-71a60e47d7a1', N'Kitchen')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'f2cfb005-7e92-4407-b29a-7abd0290f450', N'Watches')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'77172d08-fca1-47ab-866e-7bbe94495540', N'Miscellaneous')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'352c5bb8-2cc0-436a-954e-7bedbfd33690', N'DigitalMusic')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'f48c8edf-3448-4dbd-aa30-80b5cca0f0fa', N'Music')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'894a2fbb-86e1-4aee-8987-86fbbd752085', N'Software')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'9598da6a-0d11-4aa9-8bff-8a7d1157ed58', N'Merchants')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'491b7719-4af1-4689-891e-8a858c640ad9', N'ForeignBooks')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'dbbc0888-6651-4355-a664-919a49886b38', N'Photo')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'a1bf79ab-7825-447c-8f58-97bc9a8c1716', N'Shoes')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'74955877-1284-4913-99c8-a08f30a5df13', N'HomeGarden')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'30f41bde-d807-4b77-a827-a0e250a6118e', N'Classical')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'c4c88ab7-39f4-4bc8-97a5-a3d08e160780', N'Tools')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'a3ecf44c-2ed1-4711-984d-ab96b568f074', N'DVD')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'64b57420-993b-408a-85e6-b715409df8b7', N'WirelessAccessories')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'18ed659a-b6e7-46fd-87dc-befe0928ce77', N'HealthPersonalCare')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'c5fd255b-6403-42c2-808f-c71081131138', N'GourmetFood')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'6ab89928-61f0-4664-be1d-cf30396a1914', N'Beauty')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'0a9286f0-9fa0-4176-a7d8-d36852a8cdf2', N'VideoGames')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'ac5907a5-c060-4266-9a0d-e01ce55647e6', N'Blended')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'6c053bd5-2540-4fd4-ae9e-e29cb4410920', N'Hobbies')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'b5860a7a-b371-4216-8cdc-e2b32b6742c3', N'Magazines')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'03683886-d8b0-4663-802d-e2bad89c561b', N'MusicalInstruments')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'8df6f1b9-ffa7-44e2-b574-f99ed03784ea', N'VHS')
INSERT [dbo].[SearchIndex] ([ID], [IndexName]) VALUES (N'c6a3bf32-46ea-4f49-a3f4-fa42a979c579', N'SoftwareVideoGames')
/****** Object:  Table [dbo].[SortValue]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SortValue](
	[ID] [uniqueidentifier] NOT NULL,
	[Value] [nvarchar](50) NOT NULL,
	[Description] [nvarchar](550) NULL,
 CONSTRAINT [PK_SortValue] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_SortValue] ON [dbo].[SortValue] 
(
	[Value] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'9b016061-757d-4e06-9a65-0919f9bf5051', N'pricerank', N'Price: low to high')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'da9209ad-f2ee-4e3a-979e-118d4880f77d', N'-edition-sales-velocity', N'Quickest to slowest selling products.')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'aa817988-3160-4f58-ab91-14f881782a92', N'inverseprice', N'Price: high to low')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'847be800-1aa2-4022-90ac-1a8c1d8ec8be', N'subslot-salesrank', N'Bestselling')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'9ff38c2f-c98a-4074-9272-231722806208', N'sale-flag', N'On sale')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'1f905d0c-8304-4fd2-9fab-2c2f992c867d', N'daterank', N'Publication date: newer to older')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'bbefa6b7-75a9-4556-8f65-2f811a9080a8', N'inverse-pricerank', N'Price: high to low')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'af1acccf-6579-4328-b792-302caef492f7', N'orig-rel-date', N'Release date: newer to older')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'ada317f4-92c3-4884-b807-331f9eaeb77d', N'pmrank', N'Featured items')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'03e30de2-8338-4bdd-aa13-51f5bdc7a14b', N'-price', N'Price: high to low')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'd2976dee-d25e-43c5-8e99-521f7b00d1aa', N'-launch-date', N'Newest arrivals')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'0e44c5ac-6fac-4c56-9c1b-537f5fa37d5e', N'relevancerank', N'Items ranked according to the following criteria: how often the keyword appears in the description, where the keyword appears, for example, the ranking is higher when keywords are found in titles, and, if there are multiple keywords, how closely they occur in descriptions, and, finally, how often customers purchased the products they found using the keyword.')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'c0e23b6d-df47-4a1c-b0e4-5716df1d5758', N'price', N'Price: low to high')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'56008d74-1169-45a5-b42f-5aeb5865a614', N'-orig-rel-date', N'Release date: older to newer')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'46a19226-7a6c-4ca7-bf21-5b001f097f7e', N'-releasedate', N'Release date: older to newer')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'fb00e080-ed9c-4906-ac81-6674f5315fbd', N'uploaddaterank', N'Date added')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'73f65417-bf1a-470b-b46b-66819902e8d9', N'artistrank', N'Artist name: A to Z')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'addaf46d-bdcb-4c6f-9c0f-67e93e8adf4d', N'xsrelevancerank', N'Items ranked according to the following criteria: how often the keyword appears in the description, where the keyword appears, for example, the ranking is higher when keywords are found in titles, and, if there are multiple keywords, how closely they occur in descriptions, and, finally, how often customers purchased the products they found using the keyword.')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'c7fd1605-36da-4b64-a2df-74867e5280d7', N'psrank', N'Bestseller ranking taking into consideration projected sales.The lower the value, the better the sales.')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'b8d81ef8-8b40-403c-9dc5-7658f7617b59', N'+pmrank', N'Featured items')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'f5adb57a-1087-42c2-9b1e-8c10217060e9', N'salesrank', N'Bestselling')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'39316d80-2aba-4b7b-9089-990e0c86ea62', N'reviewrank', N'Average customer review: high to low')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'0333d385-9dff-49b7-9764-9c56ae9eb6ff', N'-video-release-date', N'Release date: newer to older')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'f917ab71-96fc-4ca1-a21c-9eab7b229d4a', N'-titlerank', N'Alphabetical: Z to A')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'4a03140a-1ccb-4bfd-914c-a6c4461c1f1c', N'songtitlerank', N'Most popular')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'acaf53f6-41fb-4de4-beb4-dac0cfe34c8a', N'titlerank', N'Alphabetical: A to Z')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'8a0c3528-61a8-45e6-aabe-dd34c21441cd', N'launch-date', N'Newest arrivals')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'9ec4603b-c0fe-4608-80a8-edf215972a7b', N'releasedate', N'Release date: newer to older')
INSERT [dbo].[SortValue] ([ID], [Value], [Description]) VALUES (N'ba5d42f6-9e3b-4d9b-ac84-f751ed48ecd3', N'-age-min', N'Age: high to low')
/****** Object:  Table [dbo].[PortalPreset]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PortalPreset](
	[ID] [uniqueidentifier] NOT NULL,
	[PresetName] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_PortalPreset] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT [dbo].[PortalPreset] ([ID], [PresetName]) VALUES (N'3ff40c4b-2e25-4082-aab5-edf938295cb1', N'AmazonAll')
/****** Object:  Table [dbo].[AmazonAccount]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[AmazonAccount](
	[ID] [uniqueidentifier] NOT NULL,
	[AssociateTag] [nvarchar](50) NOT NULL,
	[AssociateKey] [nvarchar](50) NOT NULL,
	[SecretKey] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_AmazonAccount] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT [dbo].[AmazonAccount] ([ID], [AssociateTag], [AssociateKey], [SecretKey]) VALUES (N'877e23b4-219d-4beb-8e37-0c6696aeac35', N'nidade-20', N'1YFT6DGPY1PYP34K8E82', N'u+TuSLt2sBoZuaDLX3EfkCex6n+phbGLcs7ILM6I')
INSERT [dbo].[AmazonAccount] ([ID], [AssociateTag], [AssociateKey], [SecretKey]) VALUES (N'63030a9c-1f98-4405-a3a2-2dc54d453acb', N'buymegadget-20', N'1YFT6DGPY1PYP34K8E82', N'u+TuSLt2sBoZuaDLX3EfkCex6n+phbGLcs7ILM6I')
INSERT [dbo].[AmazonAccount] ([ID], [AssociateTag], [AssociateKey], [SecretKey]) VALUES (N'a545c125-b0f1-49fd-bcce-a920145df913', N'woopstor-20', N'1YFT6DGPY1PYP34K8E82', N'u+TuSLt2sBoZuaDLX3EfkCex6n+phbGLcs7ILM6I')
/****** Object:  Table [dbo].[CacheData]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[CacheData](
	[StorageKey] [int] NOT NULL,
	[PartitionName] [varchar](128) NOT NULL,
	[Key] [varchar](128) NOT NULL,
	[Value] [image] NULL,
	[RefreshAction] [image] NULL,
	[Expirations] [image] NULL,
	[ScavengingPriority] [int] NOT NULL,
	[LastAccessedTime] [datetime] NOT NULL,
 CONSTRAINT [PK_CacheData] PRIMARY KEY CLUSTERED 
(
	[StorageKey] ASC,
	[PartitionName] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[AmazonLocale]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[AmazonLocale](
	[ID] [uniqueidentifier] NOT NULL,
	[LocaleISO] [nchar](2) NOT NULL,
 CONSTRAINT [PK_AmazonLocale] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT [dbo].[AmazonLocale] ([ID], [LocaleISO]) VALUES (N'e4fbf9dd-dfb6-427f-b655-178dc6ea5dd9', N'UK')
INSERT [dbo].[AmazonLocale] ([ID], [LocaleISO]) VALUES (N'2e725e17-5c1d-4aa4-9ad1-1f6d71ec6f49', N'CA')
INSERT [dbo].[AmazonLocale] ([ID], [LocaleISO]) VALUES (N'ef68cadb-815b-4010-ba66-363b481b4607', N'FR')
INSERT [dbo].[AmazonLocale] ([ID], [LocaleISO]) VALUES (N'365956fb-7391-4751-8bd3-38d5cf6d23e5', N'JP')
INSERT [dbo].[AmazonLocale] ([ID], [LocaleISO]) VALUES (N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'US')
INSERT [dbo].[AmazonLocale] ([ID], [LocaleISO]) VALUES (N'fe39604b-ed92-489a-b53b-c08b465f1c2e', N'DE')
/****** Object:  Table [dbo].[ItemSearchParameter]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ItemSearchParameter](
	[ID] [uniqueidentifier] NOT NULL,
	[Keyword] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_ItemSearchParameter] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[WebPortal]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[WebPortal](
	[ID] [uniqueidentifier] NOT NULL,
	[PortalName] [nvarchar](50) NOT NULL,
	[PortalUrl] [nvarchar](50) NULL,
	[PresetID] [uniqueidentifier] NOT NULL,
	[GoogleAnalytics] [nvarchar](1000) NULL,
	[LogoFileName] [nvarchar](100) NULL,
 CONSTRAINT [PK_WebPortal] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT [dbo].[WebPortal] ([ID], [PortalName], [PortalUrl], [PresetID], [GoogleAnalytics], [LogoFileName]) VALUES (N'c2173791-49ed-4a01-b8cf-2c6c6edcc91b', N'NiDaDe', N'http://www.nidade.com', N'3ff40c4b-2e25-4082-aab5-edf938295cb1', N'UA-1563578-72', NULL)
INSERT [dbo].[WebPortal] ([ID], [PortalName], [PortalUrl], [PresetID], [GoogleAnalytics], [LogoFileName]) VALUES (N'2ea58ccd-a482-4f30-9c29-aed5aab01280', N'Buy Me Gadget', N'http://www.buymegadget.com', N'3ff40c4b-2e25-4082-aab5-edf938295cb1', N'UA-1563578-71', NULL)
INSERT [dbo].[WebPortal] ([ID], [PortalName], [PortalUrl], [PresetID], [GoogleAnalytics], [LogoFileName]) VALUES (N'c1cf05fa-fb0c-4b5b-ad51-c726922bf003', N'Woop Store', N'http://www.woopstore.com', N'3ff40c4b-2e25-4082-aab5-edf938295cb1', N'UA-1563578-70', NULL)
/****** Object:  StoredProcedure [dbo].[UpdateLastAccessedTime]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/****** Object:  Stored Procedure dbo.UpdateLastAccessedTime    Script Date: 8/25/2004 3:28:27 PM ******/



CREATE PROCEDURE [dbo].[UpdateLastAccessedTime]
	(
		@partitionName varchar(128),
		@storageKey int,
		@lastAccessedTime DateTime
	)
AS
	update CacheData 
	set LastAccessedTime = @lastAccessedTime where [StorageKey] = @storageKey and PartitionName = @partitionName
	
	SET NOCOUNT ON
	RETURN
GO
/****** Object:  Table [dbo].[SortValueBySearchIndex]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SortValueBySearchIndex](
	[ID] [uniqueidentifier] NOT NULL,
	[SearchIndexID] [uniqueidentifier] NOT NULL,
	[LocaleID] [uniqueidentifier] NOT NULL,
	[SortValueID] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_SortValueBySearchIndex] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'c974eb85-945e-4016-be5f-0009b8e2d1e9', N'3f8bce1a-84af-4de9-b219-216eb2f11583', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'0e44c5ac-6fac-4c56-9c1b-537f5fa37d5e')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'54817fe5-acaa-482d-a5c5-027a163ac0c3', N'db896e8b-59fd-4827-b7b3-613273c9fcac', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'acaf53f6-41fb-4de4-beb4-dac0cfe34c8a')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'717e9e06-2462-418c-9985-04994bf72e4c', N'a3ecf44c-2ed1-4711-984d-ab96b568f074', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'f5adb57a-1087-42c2-9b1e-8c10217060e9')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'643a05c3-0710-4f57-ab72-0561e65c1382', N'3f8bce1a-84af-4de9-b219-216eb2f11583', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'9b016061-757d-4e06-9a65-0919f9bf5051')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'd313620f-e9f7-442c-9394-0daf9ebc2297', N'6ab89928-61f0-4664-be1d-cf30396a1914', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'd2976dee-d25e-43c5-8e99-521f7b00d1aa')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'83d86d47-ea67-4b50-8e55-0f513903a486', N'30f41bde-d807-4b77-a827-a0e250a6118e', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'56008d74-1169-45a5-b42f-5aeb5865a614')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'78133a6e-a308-47db-a812-1b9095b3c1ee', N'a3ecf44c-2ed1-4711-984d-ab96b568f074', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'9ec4603b-c0fe-4608-80a8-edf215972a7b')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'65d3e02e-a623-4a5c-9426-26cd9058278c', N'85ab31de-3bef-4841-b8b7-0dcbc224890a', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'f917ab71-96fc-4ca1-a21c-9eab7b229d4a')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'f41b427a-a291-4f98-99ee-2baf04a7702f', N'65d29b64-ae34-4e34-9c4a-467c2f935b7f', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'c7fd1605-36da-4b64-a2df-74867e5280d7')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'800e364b-9f43-4766-bd9f-2c80c72b26e6', N'352c5bb8-2cc0-436a-954e-7bedbfd33690', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'4a03140a-1ccb-4bfd-914c-a6c4461c1f1c')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'9f5279de-27c8-4820-b954-33e2ed88e343', N'85ab31de-3bef-4841-b8b7-0dcbc224890a', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'acaf53f6-41fb-4de4-beb4-dac0cfe34c8a')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'a3592d05-81b4-4bc8-835e-39777e7722d7', N'4b731bce-59ff-4309-9356-3b499dd6f6e1', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'8a0c3528-61a8-45e6-aabe-dd34c21441cd')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'fc0b6c20-2bd5-4cde-bd73-4ab2a83ad002', N'a3ecf44c-2ed1-4711-984d-ab96b568f074', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'acaf53f6-41fb-4de4-beb4-dac0cfe34c8a')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'956985dc-97fa-4efc-ad89-4dada9204f84', N'6ab89928-61f0-4664-be1d-cf30396a1914', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'c0e23b6d-df47-4a1c-b0e4-5716df1d5758')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'4450faa3-068f-438a-bb82-5256125168fa', N'db896e8b-59fd-4827-b7b3-613273c9fcac', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'c0e23b6d-df47-4a1c-b0e4-5716df1d5758')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'47d8279f-305c-4882-99ae-538629b92ed5', N'c5fd255b-6403-42c2-808f-c71081131138', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'9b016061-757d-4e06-9a65-0919f9bf5051')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'0db59281-9f30-408f-bb83-5912f3539aa6', N'65d29b64-ae34-4e34-9c4a-467c2f935b7f', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'c0e23b6d-df47-4a1c-b0e4-5716df1d5758')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'09a3b980-a5d5-41e4-9500-5ae10801ac91', N'a3ecf44c-2ed1-4711-984d-ab96b568f074', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'0e44c5ac-6fac-4c56-9c1b-537f5fa37d5e')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'4278c8a8-8118-431f-b9c2-5af4be871ae9', N'30f41bde-d807-4b77-a827-a0e250a6118e', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'f5adb57a-1087-42c2-9b1e-8c10217060e9')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'e4d8197b-999b-49c2-9aaf-5bf53a66507a', N'c5fd255b-6403-42c2-808f-c71081131138', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'8a0c3528-61a8-45e6-aabe-dd34c21441cd')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'97491462-a47f-415d-861d-5e6b9576f528', N'b5c61cfd-9fa7-48e3-a965-51e257638bbc', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'c0e23b6d-df47-4a1c-b0e4-5716df1d5758')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'863d35c3-eb5c-4c5a-a187-610b7256944a', N'65d29b64-ae34-4e34-9c4a-467c2f935b7f', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'acaf53f6-41fb-4de4-beb4-dac0cfe34c8a')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'025e9b86-dc96-4a80-bc71-6b3edda711d4', N'4b731bce-59ff-4309-9356-3b499dd6f6e1', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'aa817988-3160-4f58-ab91-14f881782a92')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'0e6a48f9-c616-4733-8890-70113d42f142', N'4b731bce-59ff-4309-9356-3b499dd6f6e1', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'ada317f4-92c3-4884-b807-331f9eaeb77d')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'5823ab6a-4195-4044-a314-75f214f694a6', N'db896e8b-59fd-4827-b7b3-613273c9fcac', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'f5adb57a-1087-42c2-9b1e-8c10217060e9')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'b6027bf3-6a1b-41e2-b2f0-76d17188d6c5', N'3f8bce1a-84af-4de9-b219-216eb2f11583', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'9ff38c2f-c98a-4074-9272-231722806208')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'c4a95eab-5cc5-46fa-9114-7b7e8038ae63', N'65d29b64-ae34-4e34-9c4a-467c2f935b7f', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'03e30de2-8338-4bdd-aa13-51f5bdc7a14b')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'312f684d-dfe9-4224-8c5a-7bab65ebc1fe', N'b5c61cfd-9fa7-48e3-a965-51e257638bbc', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'ada317f4-92c3-4884-b807-331f9eaeb77d')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'998687d1-a31d-454f-82d9-824cdc0a1bd4', N'85ab31de-3bef-4841-b8b7-0dcbc224890a', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'9b016061-757d-4e06-9a65-0919f9bf5051')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'805a6d29-bfe9-4188-b9a6-828a17d6e8ce', N'c5fd255b-6403-42c2-808f-c71081131138', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'9ff38c2f-c98a-4074-9272-231722806208')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'c91fc5dd-7325-4f68-a617-843c2b1ee710', N'b5c61cfd-9fa7-48e3-a965-51e257638bbc', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'f5adb57a-1087-42c2-9b1e-8c10217060e9')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'e045c73d-30e6-4163-8d32-8510ffe9b833', N'c5fd255b-6403-42c2-808f-c71081131138', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'f5adb57a-1087-42c2-9b1e-8c10217060e9')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'7ad2b3c6-4f27-4d55-9a12-8644ddeb4f64', N'30f41bde-d807-4b77-a827-a0e250a6118e', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'acaf53f6-41fb-4de4-beb4-dac0cfe34c8a')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'c33fb9a1-05d5-4eb4-8e36-8bbc95f9c8b7', N'b5c61cfd-9fa7-48e3-a965-51e257638bbc', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'acaf53f6-41fb-4de4-beb4-dac0cfe34c8a')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'67fe36b0-8d3d-4c85-8295-94f832d3f77a', N'a3ecf44c-2ed1-4711-984d-ab96b568f074', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'0333d385-9dff-49b7-9764-9c56ae9eb6ff')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'f50c438a-3d06-4c63-aa57-9908d87b6709', N'6ab89928-61f0-4664-be1d-cf30396a1914', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'f5adb57a-1087-42c2-9b1e-8c10217060e9')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'ca222d6c-2620-4c31-a113-99a3226b3c3a', N'a3ecf44c-2ed1-4711-984d-ab96b568f074', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'03e30de2-8338-4bdd-aa13-51f5bdc7a14b')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'4df55f84-fc63-4a9a-916b-9b99e94e98e6', N'85ab31de-3bef-4841-b8b7-0dcbc224890a', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'1f905d0c-8304-4fd2-9fab-2c2f992c867d')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'34a47d98-04e3-4d43-93a1-9d4eee15bcff', N'b5c61cfd-9fa7-48e3-a965-51e257638bbc', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'03e30de2-8338-4bdd-aa13-51f5bdc7a14b')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'703abcf5-52ae-4c4f-8120-9effd71f5c7f', N'db896e8b-59fd-4827-b7b3-613273c9fcac', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'f917ab71-96fc-4ca1-a21c-9eab7b229d4a')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'a5c32ca9-f3ea-4f50-9664-9f81dbd3aae8', N'30f41bde-d807-4b77-a827-a0e250a6118e', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'46a19226-7a6c-4ca7-bf21-5b001f097f7e')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'b45e92d4-3089-4ea5-983d-a37fe1a52132', N'c5fd255b-6403-42c2-808f-c71081131138', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'aa817988-3160-4f58-ab91-14f881782a92')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'edf687dd-f5d1-438b-9fa5-a6182a68793a', N'b5c61cfd-9fa7-48e3-a965-51e257638bbc', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'39316d80-2aba-4b7b-9089-990e0c86ea62')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'78416722-a1ad-4ac5-88d7-aecce6ee4561', N'3f8bce1a-84af-4de9-b219-216eb2f11583', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'aa817988-3160-4f58-ab91-14f881782a92')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'c68305b8-5f08-4c1c-82e5-b6e54f2a0cf9', N'3f8bce1a-84af-4de9-b219-216eb2f11583', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'd2976dee-d25e-43c5-8e99-521f7b00d1aa')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'be05bb89-6f28-4a2a-b097-b8699ede0358', N'c5fd255b-6403-42c2-808f-c71081131138', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'0e44c5ac-6fac-4c56-9c1b-537f5fa37d5e')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'3e4e9fba-865f-4760-9538-bcd757e81bef', N'30f41bde-d807-4b77-a827-a0e250a6118e', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'03e30de2-8338-4bdd-aa13-51f5bdc7a14b')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'ad470964-443c-4dd0-aeb0-c461851366f2', N'02274677-66f2-4d77-905d-04b17b791224', N'2e725e17-5c1d-4aa4-9ad1-1f6d71ec6f49', N'ada317f4-92c3-4884-b807-331f9eaeb77d')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'077caed4-978f-4cd0-98bd-c622f5cb1db8', N'85ab31de-3bef-4841-b8b7-0dcbc224890a', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'39316d80-2aba-4b7b-9089-990e0c86ea62')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'50fbb977-ad64-445d-a6f4-c8485ff005a5', N'6ab89928-61f0-4664-be1d-cf30396a1914', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'9ff38c2f-c98a-4074-9272-231722806208')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'f300ccf6-56c0-4857-9391-cb944346fd31', N'30f41bde-d807-4b77-a827-a0e250a6118e', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'9ec4603b-c0fe-4608-80a8-edf215972a7b')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'd735cb34-a85d-49db-ba60-cc762c7c5f47', N'352c5bb8-2cc0-436a-954e-7bedbfd33690', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'fb00e080-ed9c-4906-ac81-6674f5315fbd')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'06ea2250-f264-4f4e-9857-cfac9eab7130', N'a3ecf44c-2ed1-4711-984d-ab96b568f074', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'c0e23b6d-df47-4a1c-b0e4-5716df1d5758')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'd8d58c5d-103d-4cb3-9413-d2ce1e2d56ed', N'30f41bde-d807-4b77-a827-a0e250a6118e', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'c7fd1605-36da-4b64-a2df-74867e5280d7')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'91b59534-e675-4027-891a-d3b4eb9cd38f', N'6ab89928-61f0-4664-be1d-cf30396a1914', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'ada317f4-92c3-4884-b807-331f9eaeb77d')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'8692199d-a576-4391-9038-d7415c141935', N'85ab31de-3bef-4841-b8b7-0dcbc224890a', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'bbefa6b7-75a9-4556-8f65-2f811a9080a8')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'519d9420-5b75-40f4-83c5-d9f1397dec9a', N'65d29b64-ae34-4e34-9c4a-467c2f935b7f', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'f5adb57a-1087-42c2-9b1e-8c10217060e9')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'a411ffad-9e57-404b-895d-dccb7ef2c2cf', N'30f41bde-d807-4b77-a827-a0e250a6118e', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'af1acccf-6579-4328-b792-302caef492f7')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'38201b45-8e7e-4184-9857-ddde29d4ef45', N'6ab89928-61f0-4664-be1d-cf30396a1914', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'03e30de2-8338-4bdd-aa13-51f5bdc7a14b')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'fd86aa5d-34a0-4778-a288-e31551c0e6e1', N'85ab31de-3bef-4841-b8b7-0dcbc224890a', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'f5adb57a-1087-42c2-9b1e-8c10217060e9')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'a9ed61e6-de34-4356-a278-e39a3510298f', N'30f41bde-d807-4b77-a827-a0e250a6118e', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'f917ab71-96fc-4ca1-a21c-9eab7b229d4a')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'28939aa2-e1a1-44af-845f-ea6b38757392', N'85ab31de-3bef-4841-b8b7-0dcbc224890a', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'0e44c5ac-6fac-4c56-9c1b-537f5fa37d5e')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'd8af5710-5da1-4a5a-bc29-eaf53d7640c1', N'4b731bce-59ff-4309-9356-3b499dd6f6e1', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'f5adb57a-1087-42c2-9b1e-8c10217060e9')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'e7a3041d-2d63-4af7-a3e9-f06d524e067a', N'3f8bce1a-84af-4de9-b219-216eb2f11583', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'f5adb57a-1087-42c2-9b1e-8c10217060e9')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'f5f660db-9c3b-4854-b9b0-f63e2aa6d8d4', N'30f41bde-d807-4b77-a827-a0e250a6118e', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'c0e23b6d-df47-4a1c-b0e4-5716df1d5758')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'686e81db-63ce-4c53-b674-f9c3a6cdaf48', N'db896e8b-59fd-4827-b7b3-613273c9fcac', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'03e30de2-8338-4bdd-aa13-51f5bdc7a14b')
INSERT [dbo].[SortValueBySearchIndex] ([ID], [SearchIndexID], [LocaleID], [SortValueID]) VALUES (N'ed867239-ec8c-4f42-b5d7-fedeeedc89ba', N'4b731bce-59ff-4309-9356-3b499dd6f6e1', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'9b016061-757d-4e06-9a65-0919f9bf5051')
/****** Object:  StoredProcedure [dbo].[GetItemCount]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/****** Object:  Stored Procedure dbo.GetItemCount    Script Date: 8/25/2004 3:28:27 PM ******/



CREATE PROCEDURE [dbo].[GetItemCount]
(
	@partitionName varchar(128)
)
 AS 
	SET NOCOUNT ON

	SELECT COUNT(StorageKey) 
	  FROM [dbo].[CacheData] where PartitionName = @partitionName
GO
/****** Object:  StoredProcedure [dbo].[Flush]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/****** Object:  Stored Procedure dbo.Flush    Script Date: 8/25/2004 3:28:27 PM ******/



CREATE PROCEDURE [dbo].[Flush]
(
	@partitionName varchar(128)
)
AS
	SET NOCOUNT ON

	DELETE [dbo].[CacheData] where PartitionName = @partitionName
GO
/****** Object:  Table [dbo].[PresetLocale]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PresetLocale](
	[ID] [uniqueidentifier] NOT NULL,
	[PresetID] [uniqueidentifier] NOT NULL,
	[LocaleID] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_PresetLocale] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT [dbo].[PresetLocale] ([ID], [PresetID], [LocaleID]) VALUES (N'4849c007-3176-455e-ad12-fa613c1dcb8e', N'3ff40c4b-2e25-4082-aab5-edf938295cb1', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd')
/****** Object:  StoredProcedure [dbo].[AddItem]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/****** Object:  Stored Procedure dbo.AddItem    Script Date: 8/25/2004 3:28:27 PM ******/



CREATE PROCEDURE [dbo].[AddItem]
(
	@partitionName varchar(128),
	@storageKey int,
	@key varchar(128),
	@value image,
	@scavengingPriority int,
	@refreshAction image,
	@expirations image,
	@lastAccessedTime datetime
)
 AS
		delete from CacheData where StorageKey = @storageKey and PartitionName = @partitionName
		
		insert into CacheData (PartitionName, StorageKey, [Key], Value, RefreshAction, Expirations, ScavengingPriority, LastAccessedTime)
		values (@partitionName, @storageKey, @key, @value, @refreshAction, @expirations, @scavengingPriority, @lastAccessedTime)
GO
/****** Object:  StoredProcedure [dbo].[LoadItems]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/****** Object:  Stored Procedure dbo.LoadItems    Script Date: 8/25/2004 3:28:27 PM ******/



CREATE PROCEDURE [dbo].[LoadItems]
(
	@partitionName varchar(128)
)
AS
	select 
		[Key], 
		Value, 
		RefreshAction, 
		Expirations, 
		ScavengingPriority, 
		LastAccessedTime
	from CacheData where PartitionName = @partitionName
	
	SET NOCOUNT ON
	RETURN
GO
/****** Object:  Table [dbo].[SearchParameterBySearchIndex]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SearchParameterBySearchIndex](
	[ID] [uniqueidentifier] NOT NULL,
	[SearchIndexID] [uniqueidentifier] NOT NULL,
	[SearchParameter] [uniqueidentifier] NOT NULL,
	[LocaleID] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_SearchParameterBySearchIndex] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[SearchIndexByLocale]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SearchIndexByLocale](
	[ID] [uniqueidentifier] NOT NULL,
	[LocaleID] [uniqueidentifier] NOT NULL,
	[SearchIndexID] [uniqueidentifier] NULL,
	[BrowseNodeAmazonID] [nvarchar](10) NULL,
 CONSTRAINT [PK_SearchIndexByLocale] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'a65aa245-a2f6-40ef-b447-0af7740c46aa', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'f430c542-344c-46d7-848c-6ad93d2bfc6c', N'493964')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'90b56273-cc9a-41d2-9786-0b9b4ae359d5', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'792c65b6-1af4-4d0d-8653-3701171f6cf8', N'228239')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'32dfe9a4-bd0c-49b0-aabc-0f78b65e1c8e', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'352c5bb8-2cc0-436a-954e-7bedbfd33690', NULL)
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'9f1c23c9-ddb1-41e7-a411-108f88469451', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'03683886-d8b0-4663-802d-e2bad89c561b', N'11965861')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'aded7d86-aa23-4e25-b186-13d79fc8de40', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'4698705d-88f6-4aed-9cb5-199654c02dad', N'301185')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'9853ebf2-35f6-4ffa-8aaa-15c89517ad6f', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'77172d08-fca1-47ab-866e-7bbe94495540', N'10304191')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'9fa5c145-857e-4117-8ca1-2261be48e19f', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'18ed659a-b6e7-46fd-87dc-befe0928ce77', N'3760931')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'52f0c259-84dc-4b4c-8efd-2e694c696840', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'0a9286f0-9fa0-4176-a7d8-d36852a8cdf2', N'493964')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'b47e688b-1b7c-4448-b3a2-314b2b83551e', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'6a99717b-6291-43db-8a47-607e4f5818fb', N'493964')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'156be55e-28ec-4151-aad5-34019f66be53', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'f76f45cc-b115-42dc-a2e2-5ec22022155c', N'1063498')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'49144568-f7e1-4ec3-a2c4-38663d1a7861', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'3eb2aae1-539d-495a-829d-0e570c58a12f', N'130')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'683be674-42ea-4007-9008-5b5983a9f023', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'1db3db05-5286-489c-bf8f-0fbc5a2b3972', N'3760931')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'6f90a19c-136f-4cca-b841-5eb85ced3c7d', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'9598da6a-0d11-4aa9-8bff-8a7d1157ed58', N'493964')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'0ba51ea9-9fb3-4fa0-a14c-66df858682a1', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'65d29b64-ae34-4e34-9c4a-467c2f935b7f', N'1036682')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'6cff25aa-afe9-41c9-b67d-6c0097bfd924', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'616e47b6-af3c-4620-8a24-308f7c0fbb7c', N'1084128')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'a0456f70-45d4-4b50-9cfc-6c5ee1bd176e', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'9149ae82-95cb-463d-8391-170b5742d761', N'1079730')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'a3691ef4-9657-482b-b469-74f5ee1a898a', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'4b731bce-59ff-4309-9356-3b499dd6f6e1', N'3880591')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'bc77f0ce-6836-4cd5-a450-76a7b6f9a447', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'894a2fbb-86e1-4aee-8987-86fbbd752085', N'409488')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'235017e5-a593-42dc-badd-80ecab19e864', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'30f41bde-d807-4b77-a827-a0e250a6118e', N'301668')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'e9a710b0-230d-49ce-8bf5-82bed2f6ab40', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'3f8bce1a-84af-4de9-b219-216eb2f11583', N'1036682')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'40c679ad-66ae-44a1-9ee3-85a409367873', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'b5860a7a-b371-4216-8cdc-e2b32b6742c3', N'599872')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'cd64a82d-89fd-4290-aa0c-904ab386a95f', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'8df6f1b9-ffa7-44e2-b574-f99ed03784ea', N'404272')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'822f20f5-5d99-4f3e-8733-939536c41e48', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'85ab31de-3bef-4841-b8b7-0dcbc224890a', N'1000')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'0aaad419-b686-4e98-9190-97188325824b', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'b5c61cfd-9fa7-48e3-a965-51e257638bbc', N'493964')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'9a2dfff6-7776-4913-bb19-9bfaf63d0e82', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'876b02ef-b68b-4cee-bd58-4e9e81178afd', NULL)
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'2a9194be-1e40-4326-8823-a0c6cd6280ec', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'74955877-1284-4913-99c8-a08f30a5df13', N'285080')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'30252586-7fe4-4934-b64f-a19da89e5991', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'a1bf79ab-7825-447c-8f58-97bc9a8c1716', NULL)
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'd3104910-2e0d-4b38-9cbf-ab4c0a15556d', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'64b57420-993b-408a-85e6-b715409df8b7', N'13900851')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'97f6b391-3401-420d-81be-b44aeb25ea63', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'9e6392ab-6092-4999-ac31-71a60e47d7a1', N'1063498')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'dc9f5fb7-9c68-4f20-9cf1-bfe418d832e0', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'6ab89928-61f0-4664-be1d-cf30396a1914', N'11055981')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'2f5bb277-7d09-4376-95cf-c6ab992aafa0', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'2ef266b2-6b14-4204-baa4-6d22b3e1c1f2', N'1063498')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'2fffe69f-42fe-4f94-9239-cc6aa776747f', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'0d80091e-4b4b-41cc-852d-532664253113', N'195211011')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'48dcab8a-4f9e-4b0a-975f-ce4d9fd43804', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'c4c88ab7-39f4-4bc8-97a5-a3d08e160780', N'468240')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'57b5b7e9-4001-4a7b-9353-cf0ce3383f46', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'dbbc0888-6651-4355-a664-919a49886b38', N'493964')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'1becc6c2-abdf-47fc-bd2e-d489b69ee60e', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'a06d8933-1053-4e5a-9df9-5ce2ba441d11', NULL)
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'2856b28e-8970-4305-ad00-dc9bc17b7bae', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'f2cfb005-7e92-4407-b29a-7abd0290f450', N'1079730')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'942abd5e-b1af-4eb0-9bf7-dd68102dae8b', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'a3ecf44c-2ed1-4711-984d-ab96b568f074', N'130')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'715ef852-0ed6-46dd-b22f-e0c70d970666', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'c5fd255b-6403-42c2-808f-c71081131138', N'3580501')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'bb10b025-7522-4f1c-b50f-e36aa32aa750', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'b6b75523-0c09-4a6f-ac60-00e23faa22db', NULL)
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'3b29f70e-3a7d-49c9-9374-ed1a7ea60bd4', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'db896e8b-59fd-4827-b7b3-613273c9fcac', N'15690151')
INSERT [dbo].[SearchIndexByLocale] ([ID], [LocaleID], [SearchIndexID], [BrowseNodeAmazonID]) VALUES (N'91a2d53e-4c59-497c-911d-f38ad622e3c2', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd', N'f48c8edf-3448-4dbd-aa30-80b5cca0f0fa', N'301668')
/****** Object:  StoredProcedure [dbo].[RemoveItem]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/****** Object:  Stored Procedure dbo.RemoveItem    Script Date: 8/25/2004 3:28:27 PM ******/



CREATE PROCEDURE [dbo].[RemoveItem]
	(
		@partitionName varchar(128),
		@storageKey int
	)
AS
	delete from CacheData 
	where StorageKey = @storageKey and PartitionName = @partitionName
	
	SET NOCOUNT ON 
	RETURN
GO
/****** Object:  Table [dbo].[PresetSearchIndex]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PresetSearchIndex](
	[ID] [uniqueidentifier] NOT NULL,
	[PresetLocaleID] [uniqueidentifier] NOT NULL,
	[SearchIndexID] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_PresetSearchIndex] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[AmazonAccountByLocale]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[AmazonAccountByLocale](
	[ID] [uniqueidentifier] NOT NULL,
	[AccountID] [uniqueidentifier] NOT NULL,
	[PortalID] [uniqueidentifier] NOT NULL,
	[LocaleID] [uniqueidentifier] NULL,
 CONSTRAINT [PK_AmazonAccountByLocale] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT [dbo].[AmazonAccountByLocale] ([ID], [AccountID], [PortalID], [LocaleID]) VALUES (N'f346b20c-c729-49d2-9c3a-22df5d5caba6', N'63030a9c-1f98-4405-a3a2-2dc54d453acb', N'2ea58ccd-a482-4f30-9c29-aed5aab01280', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd')
INSERT [dbo].[AmazonAccountByLocale] ([ID], [AccountID], [PortalID], [LocaleID]) VALUES (N'36a78e39-cd10-4413-ae4d-29b13ffe2ced', N'877e23b4-219d-4beb-8e37-0c6696aeac35', N'c2173791-49ed-4a01-b8cf-2c6c6edcc91b', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd')
INSERT [dbo].[AmazonAccountByLocale] ([ID], [AccountID], [PortalID], [LocaleID]) VALUES (N'4a178f4e-7241-4523-921c-58557ac1d029', N'a545c125-b0f1-49fd-bcce-a920145df913', N'c1cf05fa-fb0c-4b5b-ad51-c726922bf003', N'6b7f1b2b-33e8-4385-93f9-536a9292d3fd')
/****** Object:  Table [dbo].[BrowseNode]    Script Date: 04/01/2010 12:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BrowseNode](
	[BrowseNodeId] [nvarchar](50) NOT NULL,
	[BrowseNodeName] [nvarchar](150) NOT NULL,
	[BrowseNodeParentId] [nvarchar](50) NULL,
	[SearchIndexByLocaleID] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_BrowseNode] PRIMARY KEY CLUSTERED 
(
	[BrowseNodeId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Default [DF_SearchIndex_ID]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[SearchIndex] ADD  CONSTRAINT [DF_SearchIndex_ID]  DEFAULT (newid()) FOR [ID]
GO
/****** Object:  Default [DF_SortValue_ID]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[SortValue] ADD  CONSTRAINT [DF_SortValue_ID]  DEFAULT (newid()) FOR [ID]
GO
/****** Object:  Default [DF_PortalPreset_ID]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[PortalPreset] ADD  CONSTRAINT [DF_PortalPreset_ID]  DEFAULT (newid()) FOR [ID]
GO
/****** Object:  Default [DF_AmazonAccount_ID]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[AmazonAccount] ADD  CONSTRAINT [DF_AmazonAccount_ID]  DEFAULT (newid()) FOR [ID]
GO
/****** Object:  Default [DF_AmazonLocale_ID]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[AmazonLocale] ADD  CONSTRAINT [DF_AmazonLocale_ID]  DEFAULT (newid()) FOR [ID]
GO
/****** Object:  Default [DF_ItemSearchParameter_ID]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[ItemSearchParameter] ADD  CONSTRAINT [DF_ItemSearchParameter_ID]  DEFAULT (newid()) FOR [ID]
GO
/****** Object:  Default [DF_WebPortal_ID]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[WebPortal] ADD  CONSTRAINT [DF_WebPortal_ID]  DEFAULT (newid()) FOR [ID]
GO
/****** Object:  Default [DF_SortValueBySearchIndex_ID]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[SortValueBySearchIndex] ADD  CONSTRAINT [DF_SortValueBySearchIndex_ID]  DEFAULT (newid()) FOR [ID]
GO
/****** Object:  Default [DF_PresetLocale_ID]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[PresetLocale] ADD  CONSTRAINT [DF_PresetLocale_ID]  DEFAULT (newid()) FOR [ID]
GO
/****** Object:  Default [DF_SearchParameterBySearchIndex_ID]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[SearchParameterBySearchIndex] ADD  CONSTRAINT [DF_SearchParameterBySearchIndex_ID]  DEFAULT (newid()) FOR [ID]
GO
/****** Object:  Default [DF_SearchIndexByLocale_ID]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[SearchIndexByLocale] ADD  CONSTRAINT [DF_SearchIndexByLocale_ID]  DEFAULT (newid()) FOR [ID]
GO
/****** Object:  Default [DF_PresetSearchIndex_ID]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[PresetSearchIndex] ADD  CONSTRAINT [DF_PresetSearchIndex_ID]  DEFAULT (newid()) FOR [ID]
GO
/****** Object:  Default [DF_AmazonAccountByLocale_ID]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[AmazonAccountByLocale] ADD  CONSTRAINT [DF_AmazonAccountByLocale_ID]  DEFAULT (newid()) FOR [ID]
GO
/****** Object:  ForeignKey [FK_WebPortal_PortalPreset]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[WebPortal]  WITH CHECK ADD  CONSTRAINT [FK_WebPortal_PortalPreset] FOREIGN KEY([PresetID])
REFERENCES [dbo].[PortalPreset] ([ID])
GO
ALTER TABLE [dbo].[WebPortal] CHECK CONSTRAINT [FK_WebPortal_PortalPreset]
GO
/****** Object:  ForeignKey [FK_SortValueBySearchIndex_AmazonLocale]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[SortValueBySearchIndex]  WITH CHECK ADD  CONSTRAINT [FK_SortValueBySearchIndex_AmazonLocale] FOREIGN KEY([LocaleID])
REFERENCES [dbo].[AmazonLocale] ([ID])
GO
ALTER TABLE [dbo].[SortValueBySearchIndex] CHECK CONSTRAINT [FK_SortValueBySearchIndex_AmazonLocale]
GO
/****** Object:  ForeignKey [FK_SortValueBySearchIndex_SearchIndex]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[SortValueBySearchIndex]  WITH CHECK ADD  CONSTRAINT [FK_SortValueBySearchIndex_SearchIndex] FOREIGN KEY([SearchIndexID])
REFERENCES [dbo].[SearchIndex] ([ID])
GO
ALTER TABLE [dbo].[SortValueBySearchIndex] CHECK CONSTRAINT [FK_SortValueBySearchIndex_SearchIndex]
GO
/****** Object:  ForeignKey [FK_SortValueBySearchIndex_SortValue]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[SortValueBySearchIndex]  WITH CHECK ADD  CONSTRAINT [FK_SortValueBySearchIndex_SortValue] FOREIGN KEY([SortValueID])
REFERENCES [dbo].[SortValue] ([ID])
GO
ALTER TABLE [dbo].[SortValueBySearchIndex] CHECK CONSTRAINT [FK_SortValueBySearchIndex_SortValue]
GO
/****** Object:  ForeignKey [FK_PresetLocale_AmazonLocale]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[PresetLocale]  WITH CHECK ADD  CONSTRAINT [FK_PresetLocale_AmazonLocale] FOREIGN KEY([LocaleID])
REFERENCES [dbo].[AmazonLocale] ([ID])
GO
ALTER TABLE [dbo].[PresetLocale] CHECK CONSTRAINT [FK_PresetLocale_AmazonLocale]
GO
/****** Object:  ForeignKey [FK_PresetLocale_PortalPreset]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[PresetLocale]  WITH CHECK ADD  CONSTRAINT [FK_PresetLocale_PortalPreset] FOREIGN KEY([PresetID])
REFERENCES [dbo].[PortalPreset] ([ID])
GO
ALTER TABLE [dbo].[PresetLocale] CHECK CONSTRAINT [FK_PresetLocale_PortalPreset]
GO
/****** Object:  ForeignKey [FK_SearchParameterBySearchIndex_AmazonLocale]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[SearchParameterBySearchIndex]  WITH CHECK ADD  CONSTRAINT [FK_SearchParameterBySearchIndex_AmazonLocale] FOREIGN KEY([LocaleID])
REFERENCES [dbo].[AmazonLocale] ([ID])
GO
ALTER TABLE [dbo].[SearchParameterBySearchIndex] CHECK CONSTRAINT [FK_SearchParameterBySearchIndex_AmazonLocale]
GO
/****** Object:  ForeignKey [FK_SearchParameterBySearchIndex_ItemSearchParameter]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[SearchParameterBySearchIndex]  WITH CHECK ADD  CONSTRAINT [FK_SearchParameterBySearchIndex_ItemSearchParameter] FOREIGN KEY([SearchParameter])
REFERENCES [dbo].[ItemSearchParameter] ([ID])
GO
ALTER TABLE [dbo].[SearchParameterBySearchIndex] CHECK CONSTRAINT [FK_SearchParameterBySearchIndex_ItemSearchParameter]
GO
/****** Object:  ForeignKey [FK_SearchParameterBySearchIndex_SearchIndex]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[SearchParameterBySearchIndex]  WITH CHECK ADD  CONSTRAINT [FK_SearchParameterBySearchIndex_SearchIndex] FOREIGN KEY([SearchIndexID])
REFERENCES [dbo].[SearchIndex] ([ID])
GO
ALTER TABLE [dbo].[SearchParameterBySearchIndex] CHECK CONSTRAINT [FK_SearchParameterBySearchIndex_SearchIndex]
GO
/****** Object:  ForeignKey [FK_SearchIndexByLocale_AmazonLocale]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[SearchIndexByLocale]  WITH CHECK ADD  CONSTRAINT [FK_SearchIndexByLocale_AmazonLocale] FOREIGN KEY([LocaleID])
REFERENCES [dbo].[AmazonLocale] ([ID])
GO
ALTER TABLE [dbo].[SearchIndexByLocale] CHECK CONSTRAINT [FK_SearchIndexByLocale_AmazonLocale]
GO
/****** Object:  ForeignKey [FK_SearchIndexByLocale_SearchIndex]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[SearchIndexByLocale]  WITH CHECK ADD  CONSTRAINT [FK_SearchIndexByLocale_SearchIndex] FOREIGN KEY([SearchIndexID])
REFERENCES [dbo].[SearchIndex] ([ID])
GO
ALTER TABLE [dbo].[SearchIndexByLocale] CHECK CONSTRAINT [FK_SearchIndexByLocale_SearchIndex]
GO
/****** Object:  ForeignKey [FK_PresetSearchIndex_PresetLocale]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[PresetSearchIndex]  WITH CHECK ADD  CONSTRAINT [FK_PresetSearchIndex_PresetLocale] FOREIGN KEY([PresetLocaleID])
REFERENCES [dbo].[PresetLocale] ([ID])
GO
ALTER TABLE [dbo].[PresetSearchIndex] CHECK CONSTRAINT [FK_PresetSearchIndex_PresetLocale]
GO
/****** Object:  ForeignKey [FK_PresetSearchIndex_SearchIndex]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[PresetSearchIndex]  WITH CHECK ADD  CONSTRAINT [FK_PresetSearchIndex_SearchIndex] FOREIGN KEY([SearchIndexID])
REFERENCES [dbo].[SearchIndex] ([ID])
GO
ALTER TABLE [dbo].[PresetSearchIndex] CHECK CONSTRAINT [FK_PresetSearchIndex_SearchIndex]
GO
/****** Object:  ForeignKey [FK_AmazonAccountByLocale_AmazonAccount]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[AmazonAccountByLocale]  WITH CHECK ADD  CONSTRAINT [FK_AmazonAccountByLocale_AmazonAccount] FOREIGN KEY([AccountID])
REFERENCES [dbo].[AmazonAccount] ([ID])
GO
ALTER TABLE [dbo].[AmazonAccountByLocale] CHECK CONSTRAINT [FK_AmazonAccountByLocale_AmazonAccount]
GO
/****** Object:  ForeignKey [FK_AmazonAccountByLocale_AmazonLocale]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[AmazonAccountByLocale]  WITH CHECK ADD  CONSTRAINT [FK_AmazonAccountByLocale_AmazonLocale] FOREIGN KEY([LocaleID])
REFERENCES [dbo].[AmazonLocale] ([ID])
GO
ALTER TABLE [dbo].[AmazonAccountByLocale] CHECK CONSTRAINT [FK_AmazonAccountByLocale_AmazonLocale]
GO
/****** Object:  ForeignKey [FK_AmazonAccountByLocale_WebPortal]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[AmazonAccountByLocale]  WITH CHECK ADD  CONSTRAINT [FK_AmazonAccountByLocale_WebPortal] FOREIGN KEY([PortalID])
REFERENCES [dbo].[WebPortal] ([ID])
GO
ALTER TABLE [dbo].[AmazonAccountByLocale] CHECK CONSTRAINT [FK_AmazonAccountByLocale_WebPortal]
GO
/****** Object:  ForeignKey [FK_BrowseNode_BrowseNode]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[BrowseNode]  WITH CHECK ADD  CONSTRAINT [FK_BrowseNode_BrowseNode] FOREIGN KEY([BrowseNodeParentId])
REFERENCES [dbo].[BrowseNode] ([BrowseNodeId])
GO
ALTER TABLE [dbo].[BrowseNode] CHECK CONSTRAINT [FK_BrowseNode_BrowseNode]
GO
/****** Object:  ForeignKey [FK_BrowseNode_SearchIndexByLocale]    Script Date: 04/01/2010 12:04:53 ******/
ALTER TABLE [dbo].[BrowseNode]  WITH CHECK ADD  CONSTRAINT [FK_BrowseNode_SearchIndexByLocale] FOREIGN KEY([SearchIndexByLocaleID])
REFERENCES [dbo].[SearchIndexByLocale] ([ID])
GO
ALTER TABLE [dbo].[BrowseNode] CHECK CONSTRAINT [FK_BrowseNode_SearchIndexByLocale]
GO
